package com.example.spgl.mapper;

import com.example.spgl.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Insert("insert into user(username,password,name)values(#{username},#{password},#{name})")
    void add(String username, String password, String name);
    @Select("select * from user where username=#{username}")
    User findByUsername(String username);
    //获取用户的昵称

    int selectcount();
}
